<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            background-color: #666;
        }
        .xiongda {
            position: absolute;
            width: 200px;
            height: 100px;
            background: url(media/bear.png) no-repeat;
            /* 元素添加多个动画 */
            animation: bear 1s steps(8) infinite,move 6s linear forwards;
        }
        .tuceng {
            position: absolute;
            left: 50%;
            margin-left: 130px;
            transform: translate(100%);
            width: 93px;
            height: 133px;
            right: 50px;
            background: url(images/图层3.png) no-repeat;
            animation: dandan 0.4s steps(2) infinite ,move 6s linear forwards;
        }
        @keyframes bear {
            0% {
              background-position: 0 0;  
            }
            100% {
                background-position: -1600px 0;
            }

        }
        @keyframes move {
            0% {
                left: 0%;
            }
            100% {
                left: 50%;
                transform: translate(-50%);
            }
        }
        @keyframes dandan {
            0% {
                background-position: 0,0;
            }
            100% {
                background-position: -200px,0;
            }
        }
      
    </style>
</head>
<body>
    <div class="xiongda"></div>
    <div class="tuceng"></div>
</body>
</html>